<?php
header("content-type:text/html;charset=utf-8");
require("config.php");//包含数据库连接文件
$select_sql = "SELECT * FROM  article ";
$result = mysql_query($select_sql);
?>
<html>
	<head>
	 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>发表文章</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/css/bootstrap.min.css">
	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
	<style>
	.zww
	{
	margin-top:65px;
	}
	</style>
</head>
<body>
	<div class="page-header" align="center">
		<h1>已发表文章</h1>
	</div>
	<div class="container">
		<div class="row" style="margin-top:30px">
			<a href="break.php" type="submit" id="button" name="submit" class="btn btn- pull-right">退出</a>
			</div>
			<div class="col-sm-4">
		     </div>
	    </div>
			<form class="form" method="post" action="list.php">
			<div  class="col-md-12" align="center" >
			<table  class="table table-striped table-condensed">
				<tr>
					<th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
					<th>编号</th>
					<th>标题</th>
					<th>作者</th>
					<th>内容</th>
					<th>时间</th>
					<th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
				</tr>
				<?php
					while($row = mysql_fetch_array($result))
					{
				?>
				<tr>
					<td><input type="checkbox" id="checkbox[]" name="checkbox[]" value=""><input type="hidden" name="id" value="<?php echo $row["id"]?>"></td>
					<td><?php echo $row["id"];?></td>
					<td><?php echo $row["title"];?></td>
					<td><?php echo $row["author"];?></td>
					<td><?php echo $row["content"];?></td>
					<td><?php $sta=$row["time"];?></td>
					<td></td>
				</tr>
				<?php 
					}
				?>
			</table>
			</form>
			</div>
		</div>
	</div>
</body>
</html>
